UCF STIG Viewer Logo
Changes are coming to https://stigviewer.com. Take our survey to help us understand your usage and how we can better serve you in the future.
Take Survey

The root users home directory must not be the root directory (/).


Overview

Finding ID Version Rule ID IA Controls Severity
V-774 GEN000900 SV-64353r1_rule ECCD-1 ECCD-2 Low
Description
Changing the root home directory to something other than / and assigning it a 0700 protection makes it more difficult for intruders to manipulate the system by reading the files root places in its default directory. It also gives root the same discretionary access control for root's home directory as for the other user home directories.
STIG Date
Oracle Linux 5 Security Technical Implementation Guide 2015-06-05

Details

Check Text ( C-52753r2_chk )
Determine if root is assigned a home directory other than / by listing its home directory.

Procedure:
# awk -F: '($1 == "root") { print $6 }' /etc/passwd

If the root user home directory is /, this is a finding.
Fix Text (F-54937r1_fix)
The root home directory should be something other than / (such as /roothome).

Procedure:
# mkdir /rootdir
# chown root /rootdir
# chgrp root /rootdir
# chmod 700 /rootdir
# cp -r /.??* /rootdir/.

Then, edit the passwd file and change the root home directory to /rootdir. The cp -r /.??* command copies all files and subdirectories of file names beginning with "." into the new root directory, which preserves the previous root environment. Ensure you are in the "/" directory when executing the "cp" command.